﻿using CTP.CRM.Core.MongoDB.Options;
using RabbitMQ.Client;

namespace CTP.CRM.Core.MongoDB
{
    public static class MongoDBServiceCollectionExtensions
    {
        public static IServiceCollection AddMongoDB(this IServiceCollection services, Action<MongoDBOptions> action)
        {
            services.Configure(action);
            services.AddSingleton<ConnectionFactory>();
            return services;
        }
    }
}
